package com.ruoyi.db.pms.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 商品规格对象 pms_goods_specification
 *
 * @author ruoyi
 * @date 2020-04-21
 */

@ApiModel("商品规格实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class PmsGoodsSpecification extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品规格ID")
    private Long id;

    @ApiModelProperty("商品表的商品ID")
    @Excel(name = "商品表的商品ID")
    @NotBlank(message = "商品表的商品ID不能为空")
    private Long goodsId;

    @ApiModelProperty("商品规格名称")
    @Excel(name = "商品规格名称")
    @NotBlank(message = "商品规格名称不能为空")
    @Size(min = 0, max = 255, message = "商品规格名称长度不能超过255个字符")
    private String specification;

    @ApiModelProperty("商品规格值")
    @Excel(name = "商品规格值")
    @NotBlank(message = "商品规格值不能为空")
    @Size(min = 0, max = 255, message = "商品规格值长度不能超过255个字符")
    private String value;

    @ApiModelProperty("商品规格图片")
    @Excel(name = "商品规格图片")
    @NotBlank(message = "商品规格图片不能为空")
    @Size(min = 0, max = 255, message = "商品规格图片长度不能超过255个字符")
    private String picUrl;

    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime addTime;

    @ApiModelProperty("逻辑删除")
    @Excel(name = "逻辑删除")
    private Integer deleted;

}
